package com.lemobar.pay.model.alipay.request;


import com.lemobar.pay.constants.AliPayConstants;
import com.lemobar.pay.enums.AliPayMethodEnum;
import com.lemobar.pay.model.alipay.ExtUserInfo;
import com.lemobar.pay.model.alipay.ExtendParams;
import com.lemobar.pay.model.alipay.GoodsDetail;
import lombok.Data;


/**
 * 支付宝 app 支付请求
 * alipay.trade.app.pay(app支付接口2.0)
 * https://opendocs.alipay.com/open/02e7gq?scene=20
 */
@Data
public class AliPayTradeAppPayRequest {
    private String appId;

    private String method = AliPayMethodEnum.ALIPAY_TRADE_APP_PAY.getCode();

    private String format = AliPayConstants.FORMAT_JSON;

    private String returnUrl;

    private String charset = AliPayConstants.CHARSET_UTF8_LOWER;

    private String signType = AliPayConstants.SIGN_TYPE_RSA2;

    private String sign;

    private String timestamp;

    private String version = AliPayConstants.API_VERSION;

    private String notifyUrl;

    private String appAuthToken;

    private String bizContent;


    @Data
    public static class BizContent {
        private String outTradeNo;
        private String totalAmount;
        private String subject;
        private String productCode;
        private GoodsDetail[] goodsDetail;
        private String timeExpire;
        private ExtendParams[] extendParams;
        private String promoParams;
        private String passbackParams;
        private String merchantOrderNo;
        private ExtUserInfo extUserInfo;
    }

}
